Cvicenie 1.

((π^(1/4))/(2 + E)) // 
      N

(* 
      odvolavka na posledny vystup je % *) 
% * 10

(* ako sa pouziva help? dam pred prikaz otaznik,  
      pre rozsireny help pridame na zaciatok ??  *) 
?? Plot

?*Plot

(* 
      cisla v RGB sa zadavaju od 0 po 1 *) 
Plot[Sin[x], {x, -2 π, 2  π}, 
      PlotStyle -> RGBColor[0.0, 0.6, 0.0]]

Plot[{Sin[x], Sin[2  x], Sin[3  x]}, {x, -2 π, 2  π}, 
      PlotStyle -> {Hue[0.2], Hue[0.5], Hue[0.7]}]

Plot[
      Sin[x], {x, -2 π, 2  π}, 
      AxesLabel -> {"cas", "vysledok"}]

Plot[
      Sin[x], {x, -2 π, 2  π}, Frame -> True, 
      FrameLabel -> {"cas", "vysledok"}]

Plot[
      Sin[x], {x, -2 π, 2  π}, 
      Ticks -> {{-2 π, -π, 0, π, 2  π}, {-1, 
            0, 1}}]

Plot[(1/Log)[10, x + 2], {x, -2, 10}]

plocha  =  
      Plot3D[(E^(-(Sqrt[x^2 + y^2]))), {x, -2, 
          2}, {y,  -2, 2}, ColorFunction -> Hue]

Show[plocha, BoxRatios -> {1, 1, 3}]

(* budeme kreslit vektorove polia fazovych rychlosti - nebude na pisomke!
diferencialna rovnica = popis evolucneho procesu
napr. :  - 
                  idealizovany pohyb trhovej ceny
        -  
              narast investicii v case
        -  model IS - LM *)

<<  "graphics\\plotfield.m"

PlotVectorField[{0.02  x1, 0}, {x1, 10, 50}, {x2, 0, 30}]

PlotVectorField[{0.02  x1, 0}, {x1, 10, 50}, {x2, 0, 30}, 
      PlotPoints -> 7, Axes -> True]

PlotVectorField[{0.02  x1, 0}, {x1, 10, 50}, {x2, 0, 30}, 
      ScaleFactor -> 7, PlotPoints -> 7, 
      Axes -> True]

PlotVectorField[{0.02  x1, 0}, {x1, 10, 50}, {x2, 0, 30}, 
      ScaleFactor -> 7, PlotPoints -> 7, Axes -> True, 
      ColorFunction -> Hue]

(* v trojrozmernom shit vidno,  
      takze si spraviem dvojrozmerny pohyb matematickeho kyvadla *) 
 (* 
      Pr2 :  Pohyb matematickeho kyvadla mozno popisat diferencialnymi rovnicami x1' = x2 a x2' = -kx1 .  
                x1 je uhol odklonu od zvyslej roviny .  
              x2 je uhlova rychlost,  
      eda rychlost kmitania .  k je konstanta umernosti l ku g .  
          l je dlzka kyvadla,  
      g je tiazove zrychlenie .  
          Nakreslite polia fazovych rychlosti pre rozne k. *)

(* 
      pre k = 1 *) 
PlotVectorField[{x2, -x1}, {x1, -(π/2), (π/2)}, {x2, -(π/2), (π/2)}, PlotPoints -> 7, ColorFunction -> Hue, 
      Axes -> True]

(* 
      pre k = 0.5 *) 
PlotVectorField[{x2, -0.5 x1}, {x1, -(π/2), (π/2)}, {x2, -(π/2), (π/2)}, 
      PlotPoints -> 7, ColorFunction -> Hue]

(* 
      pre k = 5 *) 
PlotVectorField[{x2, -5 
          x1}, {x1, -(π/2), (π/2)}, {x2, -(π/2), (π/2)}, PlotPoints -> 7, ColorFunction -> Hue]

(* pre k = 1,  
      ina DR teda presnejsi popis pohybu kyvadla*) 
PlotVectorField[{x2, -Sin[
            x1]}, {x1, -(π/2), (π/2)}, {x2, -(π/2), (π/2)}, PlotPoints -> 7, 
      ColorFunction -> Hue]

(* pre k = 1,  
      ina DR teda presnejsi popis pohybu kyvadla,  
      v ktorych bodoch to chcem kreslit  -  
        vzdy o Pi osmin dalej *) 
PlotVectorField[{x2, -Sin[
            x1]}, {x1, -(π/2), (π/2), (π/8)}, {x2, -(π/2), (π/2), (π/8)}, ColorFunction -> Hue, 
      Axes -> True]